package com.example.mall.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.mall.util.CodeGenerateUtils;

import java.io.Serializable;

/**
 * <p>
 * 秒杀商品表
 * </p>
 *
 * @author whale
 * @since 2025-05-06
 */
@TableName("tb_seckill_products")
public class SeckillProducts extends Model<SeckillProducts> {

    private static final long serialVersionUID = 1L;

    /**
     * 秒杀商品唯一标识
     */
    @TableId("seckill_id")
    private Long seckillId;
    /**
     * 秒杀活动ID
     */
    @TableField("activity_id")
    private Long activityId;
    /**
     * 商品ID
     */
    @TableField("product_id")
    private Long productId;
    /**
     * 秒杀价格
     */
    @TableField("seckill_price")
    private BigDecimal seckillPrice;
    /**
     * 商品原价
     */
    @TableField("original_price")
    private BigDecimal originalPrice;
    /**
     * 秒杀库存数量
     */
    @TableField("seckill_stock")
    private Integer seckillStock;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;

    public SeckillProducts() {
        this.seckillId = Long.valueOf(CodeGenerateUtils.generateUniqueId());
    }

    public Long getSeckillId() {
        return seckillId;
    }

    public void setSeckillId(Long seckillId) {
        this.seckillId = seckillId;
    }

    public Long getActivityId() {
        return activityId;
    }

    public void setActivityId(Long activityId) {
        this.activityId = activityId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public BigDecimal getSeckillPrice() {
        return seckillPrice;
    }

    public void setSeckillPrice(BigDecimal seckillPrice) {
        this.seckillPrice = seckillPrice;
    }

    public BigDecimal getOriginalPrice() {
        return originalPrice;
    }

    public void setOriginalPrice(BigDecimal originalPrice) {
        this.originalPrice = originalPrice;
    }

    public Integer getSeckillStock() {
        return seckillStock;
    }

    public void setSeckillStock(Integer seckillStock) {
        this.seckillStock = seckillStock;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "SeckillProducts{" +
        ", seckillId=" + seckillId +
        ", activityId=" + activityId +
        ", productId=" + productId +
        ", seckillPrice=" + seckillPrice +
        ", originalPrice=" + originalPrice +
        ", seckillStock=" + seckillStock +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        "}";
    }
}
